
<div data-role="page" id="writePage">
<div data-role="header" data-position="fixed">
   <h1>写日报</h1>
   <a href="#mypanel" data-icon="gear" class="ui-btn-right">设置</a>
</div>
<div data-role="content">
    <article id="reportCreation">
        <div data-role="fieldcontain">
            <label for="dateTxt">日期:</label>
            <input id="dateTxt" type="date" value="{{currentDateStr}}"/>
        </div>
        <div data-role="fieldcontain">
            <label for="content">日报内容:</label>
            <textarea id="content" rows="4" required="required"
                      placeholder="Here is your daily report..."></textarea>
        </div>

        <div data-role="fieldcontain">
            <input id="reportSubmitBtn" type="button" value="发布" class="btn btn-primary"
                   data-theme="b"/>
        </div>
    </article>
</div>

    <div data-role="footer" data-position="fixed">
        <div data-role="navbar" data-iconpos="left">
            <ul>
                <li><a href="#" data-icon="edit" class="ui-btn-active">写日报</a></li>
                <li><a href="/m/show" data-icon="bars">我的日报</a></li>
                {{#if hasSubordinate}}
                <li><a href="/m/showsubordinate" data-icon="grid">下属日报</a></li>
                {{/if}}
            </ul>
        </div>
    </div>
    <div data-role="panel" id="mypanel">
        <ul data-role="listview" data-inset="true" data-theme="e">
            <li><a href="/m/password">修改密码</a></li>
            <li><a href="/m/logout">退出登录</a> </li>
        </ul>
    </div>
</div>
<div data-role="page" id="writeErrorPage">
    <div data-role="header">
        <h1>错误提示</h1>
    </div>
    <div data-role="content">
        <p>日期格式为xxxx-xx-xx（例如 2013-5-3）并且日报内容不能为空。</p>
    </div>
</div>
<script>
    $("#writePage").bind("pagecreate", function(e) {
        init();
    });
</script>